package com.lrs.java.j2se_self.collectionReview;
import java.util.*;
public class ReviewExzample {
	//private static final Integer ONE = new Integer(1);
	private static final int ONE = 1;
	public static void main(String[] args){
		Map<String,Integer> m1 = new HashMap<String,Integer>();
		for(int j=0;j<args.length;j++){
			//Integer freq = (Integer)m1.get(args[j]);
			int freq = m1.get(args[j]) == null ? 0 : m1.get(args[j]);
			//m1.put(args[j], (freq==null?ONE:new Integer(freq.intValue()+1)));
			m1.put(args[j],(freq == 0 ? ONE : freq+1));
		}
		System.out.println(m1.size()+" words has been detected");
		System.out.println(m1);
	}
}
